//
//  LCSTextFild.h
//  理财师
//
//  Created by admin on 16/4/21.
//  Copyright © 2016年 admin. All rights reserved.
//

#import <UIKit/UIKit.h>


@class LCSTextFild;
@protocol LCSTextFieldDelegate <NSObject>

@optional
- (BOOL)lcsTextField:(LCSTextFild *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string;

- (BOOL)lcstextFieldShouldBeginEditing:(LCSTextFild *)textField;

- (BOOL)lcsTextFieldShouldClear:(LCSTextFild *)textField;

- (BOOL)lcsTextFieldShouldEndEditing:(LCSTextFild *)textField;

- (BOOL)lcsTextFieldShouldReturn:(LCSTextFild *)textField;

- (void)lcsTextFieldDidBeginEditing:(LCSTextFild *)textField;

- (void)lcsTextFieldDidEndEditing:(LCSTextFild *)textField;

-(void)lcsTextClear:(LCSTextFild *)textField;

@end


@interface LCSTextFild : UIView<UITextFieldDelegate>



@property(nonatomic,copy) NSString *text;
@property(nonatomic,strong) UIColor *textColor;
@property (nonatomic, assign) BOOL showClear;
@property(nonatomic,strong) UIImage *clearImg;

@property (nonatomic, assign) id<LCSTextFieldDelegate>delegate;

-(instancetype)initWithPlaceHolder:(NSString *)placeholder andBackGroudColor:(UIColor *)bkColor;

- (void)addTarget:(id)target action:(SEL)action forControlEvents:(UIControlEvents)controlEvents;

- (BOOL)becomeFirstResponder;
- (BOOL)resignFirstResponder;


@end
